#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
int main()
{
  pid_t pid = fork();
  if(pid == 0)
  {
    printf("I am a child process,pid:%d\n",pid);
  }
  else if(pid > 0)
  {
    int t = 5;
    while(t--)
    {
      printf("I am a father process,pid:%d\n",getpid());
      sleep(1);
    }
    wait(NULL);
  }
  return 0;
}
